home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: height.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 48 65 69 67 68 74 20 |\chapter|{Height |
|00000010| 46 69 65 6c 64 20 46 69 | 6c 65 73 7d 0a 0a 54 68 |Field Fi|les}..Th|
|00000020| 69 73 20 61 70 70 65 6e | 64 69 78 20 64 65 73 63 |is appen|dix desc|
|00000030| 72 69 62 65 73 20 74 68 | 65 20 66 6f 72 6d 61 74 |ribes th|e format|
|00000040| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 73 20 74 68 | of the |files th|
|00000050| 61 74 20 73 74 6f 72 65 | 20 64 61 74 61 0a 66 6f |at store| data.fo|
|00000060| 72 20 74 68 65 20 68 65 | 69 67 68 74 20 66 69 65 |r the he|ight fie|
|00000070| 6c 64 20 70 72 69 6d 69 | 74 69 76 65 2e 0a 54 68 |ld primi|tive..Th|
|00000080| 65 20 66 6f 72 6d 61 74 | 20 69 73 20 61 6e 20 68 |e format| is an h|
|00000090| 69 73 74 6f 72 69 63 61 | 6c 20 72 65 6c 69 63 3b |istorica|l relic;|
|000000a0| 20 61 20 62 65 74 74 65 | 72 20 66 6f 72 6d 61 74 | a bette|r format|
|000000b0| 20 69 73 20 6e 65 65 64 | 65 64 2e 0a 0a 48 65 69 | is need|ed...Hei|
|000000c0| 67 68 74 20 66 69 65 6c | 64 20 64 61 74 61 20 69 |ght fiel|d data i|
|000000d0| 73 20 73 74 6f 72 65 64 | 20 69 6e 20 62 69 6e 61 |s stored| in bina|
|000000e0| 72 79 20 66 6f 72 6d 2e | 0a 54 68 65 20 66 69 72 |ry form.|.The fir|
|000000f0| 73 74 20 72 65 63 6f 72 | 64 20 69 6e 20 74 68 65 |st recor|d in the|
|00000100| 20 66 69 6c 65 20 69 73 | 20 61 0a 33 32 2d 62 69 | file is| a.32-bi|
|00000110| 74 20 69 6e 74 65 67 65 | 72 20 67 69 76 69 6e 67 |t intege|r giving|
|00000120| 20 74 68 65 20 73 71 75 | 61 72 65 20 72 6f 6f 74 | the squ|are root|
|00000130| 20 6f 66 20 6e 75 6d 62 | 65 72 20 6f 66 20 64 61 | of numb|er of da|
|00000140| 74 61 0a 70 6f 69 6e 74 | 73 20 69 6e 20 74 68 65 |ta.point|s in the|
|00000150| 20 66 69 6c 65 2e 0a 57 | 65 27 6c 6c 20 63 61 6c | file..W|e'll cal|
|00000160| 6c 20 74 68 69 73 20 6e | 75 6d 62 65 72 0a 74 68 |l this n|umber.th|
|00000170| 65 20 73 69 7a 65 20 6f | 66 20 74 68 65 20 68 65 |e size o|f the he|
|00000180| 69 67 68 74 20 66 69 65 | 6c 64 2e 0a 0a 54 68 65 |ight fie|ld...The|
|00000190| 20 73 69 7a 65 20 69 73 | 0a 66 6f 6c 6c 6f 77 65 | size is|.followe|
|000001a0| 64 20 62 79 20 61 6c 74 | 69 74 75 64 65 20 28 24 |d by alt|itude ($|
|000001b0| 7a 24 29 20 76 61 6c 75 | 65 73 20 73 74 6f 72 65 |z$) valu|es store|
|000001c0| 64 20 61 73 20 33 32 2d | 62 69 74 0a 66 6c 6f 61 |d as 32-|bit.floa|
|000001d0| 74 69 6e 67 20 70 6f 69 | 6e 74 20 76 61 6c 75 65 |ting poi|nt value|
|000001e0| 73 2e 20 20 54 68 65 20 | 30 74 68 20 76 61 6c 75 |s. The |0th valu|
|000001f0| 65 20 69 6e 20 74 68 65 | 20 66 69 6c 65 20 73 70 |e in the| file sp|
|00000200| 65 63 69 66 69 65 73 20 | 74 68 65 20 24 7a 24 0a |ecifies |the $z$.|
|00000210| 63 6f 6f 72 64 69 6e 61 | 74 65 0a 6f 66 20 74 68 |coordina|te.of th|
|00000220| 65 20 6c 6f 77 65 72 2d | 6c 65 66 74 20 63 6f 72 |e lower-|left cor|
|00000230| 6e 65 72 20 6f 66 20 74 | 68 65 20 68 65 69 67 68 |ner of t|he heigh|
|00000240| 74 20 66 69 65 6c 64 20 | 28 30 2c 20 30 29 2e 0a |t field |(0, 0)..|
|00000250| 54 68 65 20 6e 65 78 74 | 0a 73 70 65 63 69 66 69 |The next|.specifi|
|00000260| 65 73 20 74 68 65 20 5a | 20 63 6f 6f 72 64 69 6e |es the Z| coordin|
|00000270| 61 74 65 20 66 6f 72 20 | 24 28 31 2f 28 73 69 7a |ate for |$(1/(siz|
|00000280| 65 2d 31 29 2c 20 30 29 | 24 2e 20 20 54 68 65 20 |e-1), 0)|$. The |
|00000290| 6c 61 73 74 20 73 70 65 | 63 69 66 69 65 73 20 74 |last spe|cifies t|
|000002a0| 68 65 0a 63 6f 6f 72 64 | 69 6e 61 74 65 20 66 6f |he.coord|inate fo|
|000002b0| 72 20 24 28 31 2e 2c 20 | 31 2e 29 24 2e 20 20 49 |r $(1., |1.)$. I|
|000002c0| 6e 20 6f 74 68 65 72 20 | 77 6f 72 64 73 2c 20 74 |n other |words, t|
|000002d0| 68 65 20 24 69 5e 7b 74 | 68 7d 24 20 76 61 6c 75 |he $i^{t|h}$ valu|
|000002e0| 65 20 0a 69 6e 20 74 68 | 65 20 68 65 69 67 68 74 |e .in th|e height|
|000002f0| 66 69 65 6c 64 20 66 69 | 6c 65 20 73 70 65 63 69 |field fi|le speci|
|00000300| 66 69 65 73 20 74 68 65 | 20 24 7a 24 20 63 6f 6f |fies the| $z$ coo|
|00000310| 72 64 69 6e 61 74 65 20 | 66 6f 72 20 74 68 65 20 |rdinate |for the |
|00000320| 70 6f 69 6e 74 0a 77 68 | 6f 73 65 20 24 78 24 20 |point.wh|ose $x$ |
|00000330| 63 6f 6f 72 64 69 6e 61 | 74 65 20 69 73 0a 24 28 |coordina|te is.$(|
|00000340| 69 20 5c 25 20 73 69 7a | 65 29 20 2f 20 28 73 69 |i \% siz|e) / (si|
|00000350| 7a 65 20 2d 31 29 24 2c | 20 61 6e 64 20 77 68 6f |ze -1)$,| and who|
|00000360| 73 65 0a 24 79 24 20 63 | 6f 6f 72 64 69 6e 61 74 |se.$y$ c|oordinat|
|00000370| 65 20 69 73 20 24 28 69 | 20 2f 20 73 69 7a 65 29 |e is $(i| / size)|
|00000380| 20 2f 20 28 73 69 7a 65 | 20 2d 31 29 24 2e 0a 4e | / (size| -1)$..N|
|00000390| 6f 6e 2d 73 71 75 61 72 | 65 20 68 65 69 67 68 74 |on-squar|e height|
|000003a0| 20 66 69 65 6c 64 73 20 | 6d 61 79 20 62 65 20 72 | fields |may be r|
|000003b0| 65 6e 64 65 72 65 64 20 | 62 79 20 73 70 65 63 69 |endered |by speci|
|000003c0| 66 79 69 6e 67 20 61 6c | 74 69 74 75 64 65 20 76 |fying al|titude v|
|000003d0| 61 6c 75 65 73 0a 6c 65 | 73 73 20 74 68 61 6e 20 |alues.le|ss than |
|000003e0| 6f 72 20 65 71 75 61 6c | 20 74 6f 20 74 68 65 20 |or equal| to the |
|000003f0| 6d 61 67 69 63 20 76 61 | 6c 75 65 0a 24 2d 31 30 |magic va|lue.$-10|
|00000400| 30 30 24 2e 20 20 54 72 | 69 61 6e 67 6c 65 73 20 |00$. Tr|iangles |
|00000410| 74 68 61 74 20 68 61 76 | 65 20 61 6e 79 20 76 65 |that hav|e any ve|
|00000420| 72 74 65 78 20 6c 65 73 | 73 20 74 68 61 6e 0a 6f |rtex les|s than.o|
|00000430| 72 20 65 71 75 61 6c 20 | 69 6e 20 61 6c 74 69 74 |r equal |in altit|
|00000440| 75 64 65 20 74 6f 20 74 | 68 69 73 20 76 61 6c 75 |ude to t|his valu|
|00000450| 65 20 61 72 65 20 6e 6f | 74 20 72 65 6e 64 65 72 |e are no|t render|
|00000460| 65 64 2e 0a 0a 57 68 69 | 6c 65 20 74 68 69 73 20 |ed...Whi|le this |
|00000470| 66 69 6c 65 20 66 6f 72 | 6d 61 74 20 69 73 20 63 |file for|mat is c|
|00000480| 6f 6d 70 61 63 74 2c 20 | 69 74 20 73 61 63 72 69 |ompact, |it sacri|
|00000490| 66 69 63 65 73 20 70 6f | 72 74 61 62 69 6c 69 74 |fices po|rtabilit|
|000004a0| 79 20 66 6f 72 0a 65 61 | 73 65 20 6f 66 20 75 73 |y for.ea|se of us|
|000004b0| 65 2e 20 20 57 68 69 6c | 65 20 63 72 65 61 74 69 |e. Whil|e creati|
|000004c0| 6e 67 20 61 6e 64 20 68 | 61 6e 64 6c 69 6e 67 20 |ng and h|andling |
|000004d0| 68 65 69 67 68 74 20 66 | 69 65 6c 64 20 66 69 6c |height f|ield fil|
|000004e0| 65 73 20 69 73 0a 73 69 | 6d 70 6c 65 2c 20 74 72 |es is.si|mple, tr|
|000004f0| 61 6e 73 70 6f 72 74 69 | 6e 67 20 61 20 68 65 69 |ansporti|ng a hei|
|00000500| 67 68 74 20 66 69 65 6c | 64 20 66 72 6f 6d 20 6f |ght fiel|d from o|
|00000510| 6e 65 20 6d 61 63 68 69 | 6e 65 20 74 6f 20 61 6e |ne machi|ne to an|
|00000520| 6f 74 68 65 72 0a 69 73 | 20 70 72 6f 62 6c 65 6d |other.is| problem|
|00000530| 61 74 69 63 61 6c 20 64 | 75 65 20 74 6f 20 74 68 |atical d|ue to th|
|00000540| 65 20 66 61 63 74 20 74 | 68 61 74 20 64 69 66 66 |e fact t|hat diff|
|00000550| 65 72 65 6e 63 65 73 20 | 69 6e 20 62 79 74 65 20 |erences |in byte |
|00000560| 6f 72 64 65 72 0a 61 6e | 64 20 66 6c 6f 61 74 69 |order.an|d floati|
|00000570| 6e 67 2d 70 6f 69 6e 74 | 20 66 6f 72 6d 61 74 20 |ng-point| format |
|00000580| 62 65 74 77 65 65 6e 20 | 6d 61 63 68 69 6e 65 73 |between |machines|
|00000590| 20 69 73 20 6e 6f 74 20 | 74 61 6b 65 6e 20 69 6e | is not |taken in|
|000005a0| 74 6f 0a 61 63 63 6f 75 | 6e 74 2e 0a 0a 54 68 65 |to.accou|nt...The|
|000005b0| 73 65 20 70 72 6f 62 6c | 65 6d 73 20 63 6f 75 6c |se probl|ems coul|
|000005c0| 64 20 62 65 20 63 69 72 | 63 75 6d 76 65 6e 74 65 |d be cir|cumvente|
|000005d0| 64 20 62 79 20 77 72 69 | 74 69 6e 67 20 74 68 65 |d by wri|ting the|
|000005e0| 20 68 65 69 67 68 74 20 | 66 69 65 6c 64 20 66 69 | height |field fi|
|000005f0| 6c 65 0a 69 6e 20 61 20 | 66 69 78 65 64 2d 70 6f |le.in a |fixed-po|
|00000600| 69 6e 74 20 66 6f 72 6d | 61 74 2c 20 74 61 6b 69 |int form|at, taki|
|00000610| 6e 67 20 63 61 72 65 20 | 74 6f 20 77 72 69 74 65 |ng care |to write|
|00000620| 20 74 68 65 20 62 79 74 | 65 73 20 74 68 61 74 0a | the byt|es that.|
|00000630| 65 6e 63 6f 64 65 20 61 | 20 67 69 76 65 6e 20 76 |encode a| given v|
|00000640| 61 6c 75 65 20 69 6e 20 | 61 20 63 6f 6e 73 69 73 |alue in |a consis|
|00000650| 74 65 6e 74 20 77 61 79 | 20 66 72 6f 6d 20 6d 61 |tent way| from ma|
|00000660| 63 68 69 6e 65 20 74 6f | 20 6d 61 63 68 69 6e 65 |chine to| machine|
|00000670| 2e 0a 41 6e 20 65 76 65 | 6e 20 62 65 74 74 65 72 |..An eve|n better|
|00000680| 20 69 64 65 61 20 77 6f | 75 6c 64 20 62 65 20 74 | idea wo|uld be t|
|00000690| 6f 20 77 72 69 74 65 20 | 61 20 73 65 74 20 6f 66 |o write |a set of|
|000006a0| 20 74 6f 6f 6c 73 20 66 | 6f 72 0a 6d 61 6e 69 70 | tools f|or.manip|
|000006b0| 75 6c 61 74 69 6e 67 20 | 61 72 62 69 74 72 61 72 |ulating |arbitrar|
|000006c0| 79 20 32 44 20 61 72 72 | 61 79 73 20 6f 66 20 66 |y 2D arr|ays of f|
|000006d0| 6c 6f 61 74 69 6e 67 2d | 70 6f 69 6e 74 20 76 61 |loating-|point va|
|000006e0| 6c 75 65 73 20 69 6e 20 | 61 20 63 6f 6d 70 61 63 |lues in |a compac|
|000006f0| 74 2c 0a 70 6f 72 74 61 | 62 6c 65 20 77 61 79 2c |t,.porta|ble way,|
|00000700| 20 61 6c 6c 6f 77 69 6e | 67 20 66 6f 72 20 63 6f | allowin|g for co|
|00000710| 6d 6d 65 6e 74 73 20 61 | 6e 64 20 74 68 65 20 6c |mments a|nd the l|
|00000720| 69 6b 65 20 69 6e 20 74 | 68 65 20 66 69 6c 65 5c |ike in t|he file\|
|00000730| 6c 64 6f 74 73 0a | |ldots. | |
+--------+-------------------------+-------------------------+--------+--------+